<?xml version="1.0" encoding="UTF-8"?>
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:jsf="http://xmlns.jcp.org/jsf/passthrough"
                template="/WEB-INF/templates/default.xhtml">

    <f:metadata>
        <f:event type="preRenderView" listener="#{adminWebBean.showAuList()}"/>
    </f:metadata>

    <ui:define name="htmlhead">
        <title>Gestione AUs - TravelDream</title>
    </ui:define>

    <ui:define name="content">
        <section id="section-personalizza-hotels">
        <div class="container personalizza-hotels">

            <h:dataTable styleClass="flat-table" value="#{adminWebBean.listaAU}" var="advacedUser">

                <h:column>
                    <f:facet name="header">
                        E-mail
                    </f:facet>
                    #{advacedUser.email}
                </h:column>

                <h:column>
                    <f:facet name="header">
                        Nome
                    </f:facet>
                    #{advacedUser.firstName}
                </h:column>

                <h:column>
                    <f:facet name="header">
                        Cognome
                    </f:facet>
                    #{advacedUser.lastName}
                </h:column>

            </h:dataTable>
            <div class="aggiungi-dipendete">
            <h:link styleClass="link-aggiungi-dipendete" value="Aggiunti Dipendente" outcome="insertAu"/>
            </div>
        </div>
        </section>
    </ui:define>
</ui:composition>